$model:demo

$sectors:
  y(s)              ! production
  c                 ! aggregate consumption
  va(s)             ! value added
  g                 ! government expenditure

$commodities:
  p(o)              ! price of commodity
  pc                ! price of aggregate consumption
  pg                ! price of a government output unit
  pva(s)            ! price index for value added
  pf(f)             ! price of primary factor

$consumers:
  ra                ! representative agent income
  gov               ! government income

$auxiliary:
  upl               ! unemployment index

$prod:y(s)          t:etrn(s)
  o:p(o)            q:supply(s,o)       p:0.8  a:gov  t:0.2     a:gov  t:t_p(o)
  i:p(o)            q:interm(o,s)
  i:pva(s)          q:totfac

$prod:va(s)         s:esub(s)
  o:pva(s)          q:totfac
  i:pf(f)           q:factor(f,s)       p:tp_pf(f,s)        a:gov     t:t_pf(f,s)

$prod:c             s:1.0
  o:pc              q:200
  i:p(o)            q:demand(o)

$prod:g
  o:pg              q:80
  i:p(o)            q:govdem(o)

$demand:ra
  d:pc
  e:pf(f)           q:endow(f)
* Our program crashes here - "error in numeric field"
*  e:pf("lab")       q:-endow("lab")     r:upl

$demand:gov
  d:pg

* Our program gives error - no colon in line below $constraint:
* $constraint:upl
*  pf("lab") / pc =e= 1;

$report:
  v:r_supply(s,o)   o:p(o)              prod:y(s)
  v:r_cons(o)       i:p(o)              prod:c

